<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="../Common/header.jsp"></jsp:include>




<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">	
		<section class="content-header">
		<h1>文档管理</h1>
		<ol class="breadcrumb">
			<li><a href="<c:url value="/Admin/index" />"><i
					class="fa fa-dashboard"></i> Home</a></li>

			<c:forEach items="${routers}" var="router">
				<li><i class="${router.icon}"></i><a href="javascript:void(0)">&nbsp&nbsp${router.name
						}</a></li>
			</c:forEach>

		</ol>
	</section>

	<section class="content">
		<div class="page-header"></div>
		<!-- 功能操作区域结束 -->
		<!-- 列表显示区域  -->
		<div class="box">
			<div class="box-header with-border">
				<h3 class="box-title"></h3>

				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool"
						data-widget="collapse">
						<i class="fa fa-minus"></i>
					</button>
					<button type="button" class="btn btn-box-tool" data-widget="remove">
						<i class="fa fa-remove"></i>
					</button>
				</div>
			</div>
			<div class="box-body">
				<div class="container-fluid">
<table id="userstable" class="table table-bordered table-hover">
						<thead>
							<tr>
								<th>编号</th>
								<th>文件名</th>
								<th>登录时间</th>
								<th>登录人</th>
                                <th>操作</th>
							</tr>
						</thead>
						<tbody>
						<c:forEach var="document" items="${documents}">
							<tr id="${document.id}">
							    <td>${document.id }</td>
								<td>${document.title }</td>
								<td>${document.createdate }</td>
								<td>${document.user.accountName}</td>
								<td><a href="<c:url value="/document/view?id=${document.id}" />">查看</a>&nbsp&nbsp<a href="<c:url value="/document/delete?id=${document.id}" />">删除</a></td>
							</tr>
							</c:forEach>
						</tbody>
					</table>
  
</div>
			</div>
		</div>

	</section>

</div>
<!-- /.content-wrapper -->
<jsp:include page="../Common/footer.jsp"></jsp:include>

	
<script type="text/javascript">

//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('editor');



UE.getEditor('editor').ready(function() {
    //this是当前创建的编辑器实例
    UE.getEditor('editor').setContent('${document.content}');
})


$('#userstable').DataTable({
		"initComplete": function () {
   
        },
		"paging" : true,
		"lengthChange" : true,
		"searching" : true,
		"ordering" : true,
		"info" : true,
		"autoWidth" : false,
		"language": {  
			"sLengthMenu": "每页显示  _MENU_ 条记录",  
            "sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
            "oPaginate": {
                "sFirst": "首页",
                "sPrevious": "前一页",
                "sNext": "后一页",
                "sLast": "尾页"
                },
            "sZeroRecords": "抱歉， 没有找到",
            "sInfoEmpty": "没有数据"}
	});


</script>
